Dynomotion

Group: DynoMotion Message: 12111 From: cnc_machines Date: 8/12/2015
Subject: Execute PC
Greetings,

I am having trouble executing a Python program using an M100 code. I am trying to use the "Execute PC" function and then point directly to the file location. This causes and error. I made a .BAT file that executes the python program but it also gives an error. Both the BAT and the python executable function when I try to open them directly.

Does anyone have any suggestions on what could be happening? I have attached the error.

Thanks,

Scott


  @@attachment@@
Group: DynoMotion Message: 12113 From: Tom Kerekes Date: 8/12/2015
Subject: Re: Execute PC [1 Attachment]
Hi Scott,

That would indicate that the Windows Process is returning a result code of 2. 0 should be returned to indicate no error.

What result code does your Python.exe return?

Do you know if your program is even being executed?

KMotionCNC launches the process as a hidden application and waits for it to complete.  If you don't want your application to be hidden you can spawn it from a batch file with the "Start" command.  ie

Start MyPythonProgram.exe

You might also test something simple like launching notepad.exe to see if that works correctly (note it will be hidden if not launched with the Start command).

HTH
Regards
TK